//
//  ZSY_CHAllCityTableViewCell.m
//  ZSY_BreadTrip
//
//  Created by 张诗宇 on 16/1/13.
//  Copyright © 2016年 张诗宇. All rights reserved.
//

#import "ZSY_CHAllCityTableViewCell.h"

@interface ZSY_CHAllCityTableViewCell ()

@property (nonatomic, retain) ZSY_BaseLabel *city;

@end

@implementation ZSY_CHAllCityTableViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)dealloc{
    
    [_city release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews{
    
    self.contentView.backgroundColor = [UIColor colorWithRed:63 / 255.0 green:176 / 255.0 blue:192 / 255.0 alpha:1];
    
    self.city = [[ZSY_BaseLabel alloc] initWithFrame:CGRectMake(20, 5, 100, 20)];
    self.city.textColor = [UIColor whiteColor];
    self.city.font = [UIFont systemFontOfSize:13];
    [self.contentView addSubview:self.city];
    [_city release];
    
}

- (void)setCityName:(NSString *)cityName{
    
    if (_cityName != cityName) {
        
        [_cityName release];
        _cityName = [cityName retain];
        
        
        self.city.text = _cityName;
    }
}


@end
